using UnityEngine;
using System.Collections;

public class LevelElements : MonoBehaviour 
{
	public bool hasEnabled = true;
	public string sceneName;
	
	void Start()
	{
		
		sceneName = gameObject.name;
        string[] number = gameObject.name.Split('_');
		
		if(PlayerPrefs.GetInt("CurrentScene") < int.Parse(number[0]))
		{
			renderer.material.color = Color.black;
			hasEnabled = false;
		}
        else
        {
            gameObject.AddComponent("SpecialCube");
        }
	}
}
